<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
		<script type="text/javascript" src="../js/angular-route.min.js"></script>

	</head>

	<body>
		<div ng-app="myapp">
			<div id="d1">
				<h1>Head</h1>
				<ul>
					<li>
						<a href="#/java">首页</a>
					</li>
					<li>
						<a href="#/php">PHP</a>
					</li>
					<li>
						<a href="#/ios">IOS</a>
					</li>
				</ul>
			</div>

			<div id="d2" ng-view>

			</div>
			<div id="d3">
				<h1>Footer</h1>
			</div>

		</div>
		<script type="text/javascript">
			//初始化模块，无依赖
			var myapp = angular.module("myapp", ["ngRoute"]);
			myapp.config(["$routeProvider", function($routeProvider) {
				$routeProvider.when("/java", {
					templateUrl: "5_1.html"
				}).when("/php", {
					templateUrl: "5_2.html"
				}).when("/ios", {
					templateUrl: "5_3.html"
				}).otherwise({
					redirectTo: "/java"
				})
			}])
		</script>
		
		

</html>